<?php
/**
 * Shortcuts for Piwam assets (image)
 *
 * @package    letsManager
 * @subpackage misc
 * @author     Jerome Fouilloy
 * @version    SVN: $Rev$
 */
class PiwamAccessor
{
	public static function imageTag($imgPath,$altText = '')
	{
		return image_tag('/pwCorePlugin/images/'.$imgPath,array('alt' => $altText,'title' => $altText));
	}
	public static function imagePath($imgPath)
	{
		return image_path('/pwCorePlugin/images/'.$imgPath);
	}
	public static function clickableImage($img,$text,$route)
	{
		return link_to(self::imageTag($img,$text), $route);
	}
	public static function iconTagEdit($text = "Editer")
	{
		return self::imageTag("icons/edit",$text);
	}
	public static function iconPathEdit()
	{
		return self::imagePath("icons/edit");
	}

	public static function iconPathCalendar()
	{
		return self::imagePath("calendar.gif");
	}
	
	public static function iconTagOk($text ="OK")
	{
		return self::imageTag('state_ok.png',$text);
	}
	public static function iconTagKo($text = "KO")
	{
		return self::imageTag('state_ko.png',$text);
	}
}
?>